package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@TableName("question")
@ApiModel("题目类")
public class Question {
    @TableId(value = "question_id")
    @ApiModelProperty("题目id")
    private int id;
    @TableField("question_content")
    @ApiModelProperty("题目内容")
    private String cont;
    @TableField("question_type")
    @ApiModelProperty("题目类型")
    private int qtype;
    @TableField("option_type")
    @ApiModelProperty("选项类型")
    private int otype;
    @TableField("option_1")
    @ApiModelProperty("选项1")
    private String op1;
    @TableField("option_2")
    @ApiModelProperty("选项2")
    private String op2;
    @TableField("option_3")
    @ApiModelProperty("选项3")
    private String op3;
    @TableField("option_4")
    @ApiModelProperty("选项4")
    private String op4;
    @TableField("question_answer")
    @ApiModelProperty("答案")
    private String ans;

    public Question() {
    }

    public Question(int id, String cont, int qtype, int otype, String op1, String op2, String op3, String op4, String ans) {
        this.id = id;
        this.cont = cont;
        this.qtype = qtype;
        this.otype = otype;
        this.op1 = op1;
        this.op2 = op2;
        this.op3 = op3;
        this.op4 = op4;
        this.ans = ans;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCont() {
        return cont;
    }

    public void setCont(String cont) {
        this.cont = cont;
    }

    public int getQtype() {
        return qtype;
    }

    public void setQtype(int qtype) {
        this.qtype = qtype;
    }

    public int getOtype() {
        return otype;
    }

    public void setOtype(int otype) {
        this.otype = otype;
    }

    public String getOp1() {
        return op1;
    }

    public void setOp1(String op1) {
        this.op1 = op1;
    }

    public String getOp2() {
        return op2;
    }

    public void setOp2(String op2) {
        this.op2 = op2;
    }

    public String getOp3() {
        return op3;
    }

    public void setOp3(String op3) {
        this.op3 = op3;
    }

    public String getOp4() {
        return op4;
    }

    public void setOp4(String op4) {
        this.op4 = op4;
    }

    public String getAns() {
        return ans;
    }

    public void setAns(String ans) {
        this.ans = ans;
    }

    @Override
    public String toString() {
        return "Question{" +
                "id=" + id +
                ", cont='" + cont + '\'' +
                ", qtype=" + qtype +
                ", otype=" + otype +
                ", op1='" + op1 + '\'' +
                ", op2='" + op2 + '\'' +
                ", op3='" + op3 + '\'' +
                ", op4='" + op4 + '\'' +
                ", ans='" + ans + '\'' +
                '}';
    }
}
